<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

Class Sitemap extends CI_Controller {
 
    public function __construct() {
        parent::__construct();
        $this->load->model('dish/dish_model');
		$this->load->model('restaurant/menus_model');
		$this->load->model('categories/categories_model');
    }

    function index ()
    {
		$data['urlslist'] = array();
		$filter = array ('status' => 1,'frontend' => 1);

		/*$menus = $this->menus_model->get_menus($filter);
		foreach ($menus as $item)
		{
			$data['urlslist'][] = $item['link'];
		}*/

		$categories = $this->dish_model->get_categories($filter);
		foreach ($categories as $item)
		{
			$data['urlslist'][] = $item['link'];
		}	

		$dishs = $this->dish_model->get_dishs($filter);

		foreach ($dishs as $item)
		{
			$data['urlslist'][] = $item['link'];
		}
		
			
		
        $this->load->view("sitemap_view", $data);
    }
}
?>